package dbops

import (
	"log"

	_ "github.com/go-sql-driver/mysql"
)

// AddVideoDelRecord 向数据库写
func AddVideoDelRecord(vid string) error {
	stmt, err := dbConn.Prepare("INSERT into video_del_rec (video_id) values (?)")
	if err != nil {
		return err
	}
	_, err = stmt.Exec(vid)
	if err != nil {
		log.Printf("AddVideoDelRecord error: %v", err)
		return err
	}
	defer stmt.Close()
	return nil
}
